<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>这是父传子</title>
</head>

<body>
    <div id="app">
        Father
        <hadden :gettext='text'></hadden>
    </div>
    <script src="../libs/vue/vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                text: '你好啊~这是父传子！'
            },
            components: {
                'hadden': {
                    template: `
                    <div>Child
                        {{gettext}}
                        </div >
                    `,
                    props: [
                        'gettext'
                    ]
                }
            }
        })
    </script>
</body>

</html>